﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace MinistryStandardPlatformWeb
{
    public class CommonDictionary
    {
        public static int PageSize = 15;
        public static int SmallerPageSize = 10;
        public static string DataBaseUserId = "ministrystandard";
        public static string DateStrFormat = "yyyy-MM-dd";
        public static string DateTimeStrFormat = "yyyy-MM-dd HH:mm:ss";
        public static Dictionary<string, string> GpsTypeDic = new Dictionary<string, string>();
        public static Dictionary<string, string> GpsVersionDic = new Dictionary<string, string>();

        public static Dictionary<EWarnType, string> WarningType = new Dictionary<EWarnType, string>();

        static CommonDictionary()
        {
            GpsTypeDic.Add("1", "HQ");
            GpsTypeDic.Add("2", "GB");
            GpsTypeDic.Add("3", "YW");
            GpsTypeDic.Add("4", "KKS");
            GpsTypeDic.Add("5", "JZ");

            GpsVersionDic.Add("20", "GB");
            GpsVersionDic.Add("21", "ST");
            GpsVersionDic.Add("22", "A6");
            GpsVersionDic.Add("23", "BD");
            GpsVersionDic.Add("24", "A6BD");
            GpsVersionDic.Add("30", "GL100");
            GpsVersionDic.Add("31", "GL200");
            GpsVersionDic.Add("32", "GV320");
            GpsVersionDic.Add("33", "GL505");
            GpsVersionDic.Add("11", "V3");
            GpsVersionDic.Add("40", "TR06");
            GpsVersionDic.Add("41", "GT08");

            WarningType.Add(EWarnType.Emergency, "紧急报警");
            WarningType.Add(EWarnType.OverSpeed, "超速报警");
            WarningType.Add(EWarnType.Fatigue, "疲劳驾驶");
            WarningType.Add(EWarnType.Danger, "危险预警");
            WarningType.Add(EWarnType.GnssModel, "gnss故障");
            WarningType.Add(EWarnType.GnssAnt, "gnss天线");
            WarningType.Add(EWarnType.UnderVoltage, "终端欠压");
            WarningType.Add(EWarnType.PowerOff, "终端电源掉电");
            WarningType.Add(EWarnType.LcdFault, "终端lcd或显示器故障");
            WarningType.Add(EWarnType.TtsFault, "tts模块故障");
            WarningType.Add(EWarnType.CameraFault, "摄像头故障");
            WarningType.Add(EWarnType.DriveTimeout, "当天累计驾驶超时");
            WarningType.Add(EWarnType.ParkTimeout, "停车超时");
            WarningType.Add(EWarnType.InOutArea, "进出区域");
            WarningType.Add(EWarnType.InOutLine, "进出路线");
            WarningType.Add(EWarnType.RoadDriveTimeLack, "路段行驶时间不足");
            WarningType.Add(EWarnType.RoadDeviate, "路线偏离");
            WarningType.Add(EWarnType.VssFault, "车辆vss故障");
            WarningType.Add(EWarnType.OilFault, "车辆油量异常");
            WarningType.Add(EWarnType.Stolen, "车辆被盗");
            WarningType.Add(EWarnType.IllegalIgnition, "车辆非法点火");
            WarningType.Add(EWarnType.IllegalDisplacement, "车辆非法位移");
            WarningType.Add(EWarnType.HighPressure, "终端主电源高压");
            WarningType.Add(EWarnType.IcFault, "道路运输证ic模块故障");
            WarningType.Add(EWarnType.OverSpeedAlert, "超速预警");
            WarningType.Add(EWarnType.FatigueAlert, "疲劳驾驶预警");
            WarningType.Add(EWarnType.CrashAlert, "碰撞预警");
            WarningType.Add(EWarnType.SideTurnAlert, "侧翻预警");
            WarningType.Add(EWarnType.IllegalOpendoor, "非法开车门");
            WarningType.Add(EWarnType.VideoLose, "视频丢失");
            WarningType.Add(EWarnType.VideoCover, "视频遮挡");
            WarningType.Add(EWarnType.Hijack, "劫警");
            WarningType.Add(EWarnType.IllegalDuration, "非法时段报警");
            WarningType.Add(EWarnType.RestTimeLack, "停车休息时间不足");
            WarningType.Add(EWarnType.OverStation, "越站");
            WarningType.Add(EWarnType.SetDefend, "设防");
            WarningType.Add(EWarnType.CutLine, "剪线报警");
            WarningType.Add(EWarnType.BatteryUndervoltage, "电瓶低压报警");
            WarningType.Add(EWarnType.PasswordFault, "密码错误");
            WarningType.Add(EWarnType.ForbidRun, "禁行报警");
            WarningType.Add(EWarnType.IllegalStop, "非法停车报警");
            WarningType.Add(EWarnType.SdAbnormal, "sd卡异常");
        }

        public static string OverSpeedWarnType = "1";

        //报警类别
        public enum EWarnType
        {
            Emergency,//紧急报警
            OverSpeed,//超速报警
            Fatigue,//疲劳驾驶
            Danger,//危险预警
            GnssModel,//gnss故障
            GnssAnt,//gnss天线
            UnderVoltage,//终端欠压
            PowerOff,//终端电源掉电
            LcdFault,//终端lcd或显示器故障
            TtsFault,//tts模块故障
            CameraFault,//摄像头故障
            DriveTimeout,//当天累计驾驶超时
            ParkTimeout,//停车超时
            InOutArea,//进出区域
            InOutLine,//进出路线
            RoadDriveTimeLack,//路段行驶时间不足
            RoadDeviate,//路线偏离
            VssFault,//车辆vss故障
            OilFault,//车辆油量异常
            Stolen,//车辆被盗
            IllegalIgnition,//车辆非法点火
            IllegalDisplacement,//车辆非法位移
            HighPressure,//终端主电源高压
            IcFault,//道路运输证ic模块故障
            OverSpeedAlert,//超速预警
            FatigueAlert,//疲劳驾驶预警
            CrashAlert,//碰撞预警
            SideTurnAlert,//侧翻预警
            IllegalOpendoor,//非法开车门
            VideoLose,//视频丢失
            VideoCover,//视频遮挡
            Hijack,//劫警
            IllegalDuration,//非法时段报警
            RestTimeLack,//停车休息时间不足
            OverStation,//越站
            SetDefend,//设防
            CutLine,//剪线报警
            BatteryUndervoltage,//电瓶低压报警
            PasswordFault,//密码错误
            ForbidRun,//禁行报警
            IllegalStop,//非法停车报警
            SdAbnormal//sd卡异常
        };

        public static string SpeedLimitCmdName = "最高速度(km/h)";

    }
}